import React, { Component } from 'react';
import {
    Route,
    Redirect,
    Switch
} from 'react-router-dom';
import Home from '../module/home/index';
import ProductDetails from '../module/home/product-details';
import StartLongList from '../module/starLongList/index';
import Find from '../module/find/index';

export default class RouteMap extends Component {
    render() {
        return (
            <div>
                <Switch>
                    <Route exact path="/" render={() => (<Redirect to="/Home" />)}></Route >
                    {/* match.params.id */}
                    <Route exact path="/Home" component={Home} />
                    <Route exact path='/Home/:id' component={ProductDetails} />
                    <Route exact path='/Start/longList' component={StartLongList} />

                    <Route path="/Find" component={Find} />
                </Switch>
            </div>
        )
    }
}